Skip to content

[llvm][NFC] Update LocalVarDef::CVRegister to fix size MS ABI #140214

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 16, 2025

Conversation

ojhunt
Copy link
Contributor

@ojhunt ojhunt commented May 16, 2025

LocalVarDef::CVRegister being a uint16_t is not enough for the fields to be packed with the MS ABI.

This makes the field a 16 bit a uint32_t

@ojhunt ojhunt merged commit 39fa5b3 into main May 16, 2025
5 of 9 checks passed
@ojhunt ojhunt deleted the users/ojhunt/fix-MSABI-LocalVarDef-size branch May 16, 2025 07:47
@llvmbot
Copy link
Member

llvmbot commented May 16, 2025

@llvm/pr-subscribers-debuginfo

Author: Oliver Hunt (ojhunt)

Changes

LocalVarDef::CVRegister being a uint16_t is not enough for the fields to be packed with the MS ABI.

This makes the field a 16 bit a uint32_t


Full diff: https://github.com/llvm/llvm-project/pull/140214.diff

1 Files Affected:

  • (modified) llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.h (+1-1)
diff --git a/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.h b/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.h
index be6eb4c8998bd..d13b315135ad9 100644
--- a/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.h
+++ b/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.h
@@ -70,7 +70,7 @@ class LLVM_LIBRARY_VISIBILITY CodeViewDebug : public DebugHandlerBase {
 
     /// Register containing the data or the register base of the memory
     /// location containing the data.
-    uint16_t CVRegister;
+    uint32_t CVRegister : 16;
 
     uint64_t static toOpaqueValue(const LocalVarDef DR) {
       uint64_t Val = 0;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants